# -*- encoding: utf-8 -*-
# @File    :   user.py
# @Time    :   2021/07/23 14:15:35
# @Author  :   wudongmin
# @Contact :   wudongmin@xroom.net
# @version   :  1.0

from . import ServiceBase
from app.db.user import RepositoryUser

class ServiceUser(ServiceBase):
    # service user

    def __init__(self) -> None:
        self._db = RepositoryUser()
        super().__init__()

    def get_user_list(self, page_params=None, order_params=None) -> dict:
        # 获取user列表
        l, count = self._db.get_user_list(page_params=page_params, order_params=order_params)
        return dict(list=l, total=count)
